From: Timo Tijhof Date: Mon, 23 Apr 2018 14:56:54 +0000 (+0100) Subject: selenium: Abstract test command behind 'npm run' X-Git-Tag: 1.31.0-rc.0~14^2 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24plugin.url%7Cescape%7D?a=commitdiff_plain;h=8dea6c2c39e35067d8d2b5c7af3422f205708100;p=lhc%2Fweb%2Fwiklou.git selenium: Abstract test command behind 'npm run' This makes it possible to use in Quibble. Right now, Quibble cannot use 'npm run selenium' yet because it sets up its own chromedriver, which would conflict with selenium.sh. But, in preparation for Id95f18927b5, we can at least abstract the test command so that it can easily be changed without having to update Quibble and without having to worry about it being the same in all MediaWiki branches. Bug: T179190 Change-Id: I622ec3bf36746502cae891cc6bec23982b21f876 --- diff --git a/package.json b/package.json index a282d6931b..416a23e972 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "qunit": "grunt qunit", "doc": "jsduck", "postdoc": "grunt copy:jsduck", - "selenium": "./tests/selenium/selenium.sh" + "selenium": "./tests/selenium/selenium.sh", + "selenium-test": "grunt webdriver:test" }, "devDependencies": { "bluebird": "3.5.1", diff --git a/tests/selenium/selenium.sh b/tests/selenium/selenium.sh index 519b7be9ac..6b71019b28 100755 --- a/tests/selenium/selenium.sh +++ b/tests/selenium/selenium.sh @@ -6,4 +6,4 @@ function kill_chromedriver() { killall chromedriver > /dev/null } trap kill_chromedriver EXIT -./node_modules/.bin/grunt webdriver:test +npm run selenium-test